package com.meilai.project.service.personnel.attendance;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.dto.personnel.attendance.LeaveApplyDTO;
import com.meilai.project.entity.personnel.attendance.LeaveApply;
import com.meilai.project.vo.personnel.attendance.LeaveApplyVO;

public interface LeaveApplyService extends IService<LeaveApply> {
    // 请假列表
    Page<LeaveApplyVO> selectPageList(Integer current_page,
                                      Integer page_size);

    // 待审核
    Page<LeaveApplyVO> checkPageList(Integer current_page,
                                     Integer page_size);

    // 请假保存
    boolean save(LeaveApplyDTO dto, Long wf_data_id, boolean flag);

    /**
     * 请假提交
     *
     * @param dto
     * @param wf_data_id
     * @return
     */
    boolean submit(LeaveApplyDTO dto, Long wf_data_id);

    // 审核通过
    boolean adopt(LeaveApplyDTO dto);

    // 审核拒绝
    boolean refuse(LeaveApplyDTO dto);

    /**
     * 审核方法
     *
     * @param flow_id
     * @param wf_data_id
     * @param isReturn
     * @param opinion
     * @return
     */
    boolean check(Long flow_id, Long wf_data_id, Boolean isReturn, String opinion);


    /**
     * 删除流程
     *
     * @param flow_id
     * @return
     */
    boolean remove(Long flow_id, Long wf_data_id);

    /**
     * 彻底删除方法
     *
     * @param flow_id
     * @param wf_data_id
     * @return
     */
    boolean actualDelete(Long flow_id, Long wf_data_id);


    /**
     * 根据流程ID查询Dto
     *
     * @param flow_id
     * @return
     */
    LeaveApplyDTO getDtoById(Long flow_id);
}
